<template>
	<a-card :bordered="false">
	<basic-form
		ref="#(beanName)Form"
		v-model="#(beanName)Form"
		:rules="#(beanName)Rules"
		primary-key="#(primaryName)"
		:query-api="#(beanName)_queryByIdApi"
		:insert-api="#(beanName)_insertApi"
		:update-api="#(beanName)_updateApi"
	>
		#for(item : columns)
			#if(item.showForm)
				<a-form-model-item label="#(item.comment)" prop="#(item.name)" ref="#(item.name)" :hasFeedback="true">
					#if(item.showForm=='input')
						<a-input v-model="#(beanName)Form.#(item.name)" placeholder="请输入#(item.comment)"></a-input>
					#else if(item.showForm=='date')
						<a-date-picker v-model="#(beanName)Form.#(item.name)" show-time valueFormat="YYYY-MM-DD" placeholder="请选择#(item.comment)" style="width:100%"></a-date-picker>
					#else	if(item.showForm=='radio')
						<a-radio-group v-model="#(beanName)Form.#(item.name)">
							<a-radio :value="true">是</a-radio>
							<a-radio :value="false">否</a-radio>
						</a-radio-group>
					#else if(item.showForm=='dictionarySelect')
						<dictionary-select codeItemId="#(item.dictionaryTypeId)" v-model="#(beanName)Form.#(item.name)"></dictionary-select>
					#else	if(item.showForm=='textarea')
						<a-input :rows="4" type="textarea" v-model="#(beanName)Form.#(item.name)" placeholder="请输入#(item.comment)"></a-input>
					#end
				</a-form-model-item>
			#end
		#end
	</basic-form>
	</a-card>
</template>
<script>
	import {
		#(beanName)_queryByIdApi,
		#(beanName)_insertApi,
		#(beanName)_updateApi
	} from "@/api/#(moduleName)/#(beanName)";
	import { #(beanName)Rules} from "@/profile/#(moduleName)/#(beanName)"

export default {
  data() {
    return {
	  #(beanName)Rules,
	  #(beanName)_queryByIdApi,
	  #(beanName)_insertApi,
	  #(beanName)_updateApi,
	  #(beanName)Form: {
		#(primaryName): this.$route.params.id,
	  }
    };
  }
};
</script>